package com.example.arffrecorder.graphics;

import com.example.arffrecorder.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;
import android.widget.Toast;

public class MainScreen extends Activity{
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_main);

	    GridView gridview = (GridView) findViewById(R.id.gridview);
	    gridview.setAdapter(new ImageAdapter(this));

	    gridview.setOnItemClickListener(new OnItemClickListener() {
	        public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
	            //Toast.makeText(MainScreen.this, "" + position, Toast.LENGTH_SHORT).show();
	        	//start the recording activity
	        	if (position == 0){
	        		Intent i = new Intent(MainScreen.this, VisualizeActivity.class);
	                startActivity(i);
	        	}
	        }
	    });
	}
}
